package com.game.framework.dao.config;

import com.game.framework.dao.DefaultGameDaoEventExecutorFactory;
import com.game.framework.dao.IGameDaoExecutorFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;

@Slf4j
@Configuration
public class GameDaoAutoConfig {

	@PostConstruct
	public void init() {
        log.info("GameDaoAutoConfig init()");
	}

    @Bean
    @ConditionalOnMissingBean
    public IGameDaoExecutorFactory gameDaoExecutorFactory() {
        return new DefaultGameDaoEventExecutorFactory();
    }
}
